'use strict'
module.exports = (sequelize, DataTypes) => {
  const User = sequelize.define(
    'User',
    {
      // id: DataTypes.INTEGER,
      username: DataTypes.STRING,
      password: DataTypes.STRING,
      email: DataTypes.STRING,
      is_admin: DataTypes.BOOLEAN,
      status: DataTypes.BOOLEAN,
    },
    {},
    {
      defaultScope: {
        attributes: { exclude: ['password'] },
      },
    }
  )
  User.associate = function (models) {
    // associations can be defined here
    // User.hasOne(models.UserInfo)
  }
  return User
}
